
<#include "*/general/header.ftl">

<h3>My Account</h3>

<h4>Account Information</h4>

<table class="supa">
    <tr>
        <th scope="row" class="spec top">First Name:</th>
        <td class="top">${user.firstName}</td>
    </tr>
    <tr>
        <th scope="row" class="spec">Last Name:</th>
        <td>${user.lastName}</td>
    </tr>
    <tr>
        <th scope="row" class="spec">Username:</th>
        <td>${user.username}</td>
    </tr>
    <tr>
        <th scope="row" class="spec">Email:</th>
        <td>${user.email}</td>
    </tr>
    <tr>
        <th scope="row" class="spec">Address:</th>
        <td>${user.address}</td>
    </tr>

</table>

<h4>Transaction History</h4>


<#if invoices?? >
<table class="supa">
    <tr>
      <th scope="col" class="nobg">Product Name</th> 
      <th scope="col">Quantity</th>
      <th scope="col">Cost</th>
      <th scope="col">Transaction Amount</th> 
      <th scope="col">Status</th>
      <th scope="col">Purchase Date</th>
    </tr> 
    
    <#list invoices as invoice >
        <tr>
            <th scope="row" class="spec">${invoice[0]}</th>
            <td>${invoice[1]}</td>
            <td>${invoice[2]}</td>
            <td>${invoice[3]}</td>
            <td>${invoice[4]}</td>
            <td>${invoice[5]}</td>
        </tr>
    </#list>
</table>
<#else>
<p>No Transactions yet. Start buying !!!</p>
</#if>

<#include "*/general/footer.ftl">